function [IA_Relation] = IA_Relation(relationship)
%IA_Relation Summary of this function goes here
%   Detailed explanation goes here

% Matrix of relationships as follows:
% [< d  o  m  s  f  =]
% [> di oi mi si fi =]
% where:
% <  is less than
% d  is during
% o  is overlaps
% m  is meets
% s  is starts
% f  is finishes
% =  is equals (commutative: if A = B then B = A)
% >  is greater than
% di is, is during or contains
% oi is overlapped by
% mi is met by
% si is started by
% fi is finished by

% Only take Allen's Interval Algebra subset.
IA_Relation.set = relationship(1:2,1:7);

% Ensure equals is properly applied (A = B must be same as B = A).
if IA_Relation.set(1, 7) ~= IA_Relation.set(2, 7)
  IA_Relation.set(2, 7) = IA_Relation.set(1, 7);
end
end